﻿using System;
using System.Reflection;
using Microsoft.TeamFoundation.Client;

namespace TShooter.TfsWord.TeamFoundation
{
    public static class TeamFoundationServerExtensions
    {

        public static T GetService<T>(this TeamFoundationServer server)
        {
            if (server == null)
            {
                throw new ArgumentNullException("server");
            }
            
            return (T) server.GetService(typeof (T));
        }
    }
}
